'''
Created on Dec 9, 2010

@author: german
'''

from django.db.models import get_model
from django.conf import settings

def my_vote_on_object(func):
    def new_func(*args, **kwargs):
        app_name = kwargs['app']
        model_name = kwargs['model']
        model = get_model(app_name, model_name)
        del kwargs['app']
        kwargs.update({'model': model}) 
        return func(*args,**kwargs)
    return new_func
